package gwt.trading.client;

import gwt.trading.client.geometry.Padding;
import gwt.trading.client.geometry.Spacing;
import gwt.trading.client.util.ColorEnum;

/**
 * @author Iulian Costan (iulian.costan@gmail.com)
 *
 */
public class TradingChartSettings {

	private int width;
	private int height;
	private Padding padding;
	private Spacing spacing;
	private ColorEnum bgColor = ColorEnum.BLACK;
	private ColorEnum borderColor = ColorEnum.RED;
	
	public final static int VERTICAL_AXIS_WIDTH = 40;
	public final static int HORIZONTAL_AXIS_WIDTH = 25;

	public TradingChartSettings(int width, int height) {
		this(width, height, new Padding(5), Spacing.DEFAULT);
	}

	public TradingChartSettings(int width, int height, Padding padding, Spacing spacing) {
		this.width = width;
		this.height = height;
		this.padding = padding;
		this.spacing = spacing;
	}

	public int getWidth() {
		return width - (padding.getLeft() + padding.getRight());
	}

	public int getHeight() {
		return height - (padding.getTop() + padding.getBottom());
	}
	
	public int getRealHeight() {
		return height;
	}

	public int getRealWidth() {
		return width;
	}

	public Padding getPadding() {
		return padding;
	}

	public Spacing getSpacing() {
		return spacing;
	}

	public ColorEnum getBgColor() {
		return bgColor;
	}

	public ColorEnum getBorderColor() {
		return borderColor;
	}

}